<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Stimulus360.Controllers.Projects.CategorizedProjectsListingViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<div class="main">
    	<div class="contetTittle">
			<div class="floatLeft">
				<a href="javascript:void(0);" class="headerLabel"><span><%=Model.Category %></span></a>
				  <%=Html.Hidden("hdnCategory", Model.Category)%>
			</div>
		  
			</div> 
			 <div id="projListContainer">
            <%Html.RenderPartial("ProjectsList",Model.Projects); %>
        </div>
            <div class="pagerbg">
            <div id="pagerProjList" class="pager"></div>
            </div>
	  </div>
	  
	  <!-- Right Col Start -->
    <div class="rightCol">
        <%Html.RenderPartial("ProjectSearch"); %>
        
        <%Html.RenderPartial("ProjectsTagCloud", Model.Categories); %>
    
        <%Html.RenderPartial("ProjectRSSTagCloud"); %>
    </div>
<!-- Right Col Start -->
      <script type="text/javascript" language="javascript">
          $(document).ready(function() {
              var totalCount = "<%= Model.Projects.TotalCount %>";

              if (totalCount == 0) {
                  $(".pagerbg").hide();
              }

              var totalPages_Idea = "<%=Model.Projects.TotalPages %>";
              if (totalPages_Idea == 1) {
                  $(".pagerbg").hide();
              }
              var currentPage = "<%=Model.Projects.PageIndex%>";
              $("#pagerProjList").pager({ pagenumber: currentPage, pagecount: totalPages_Idea, buttonClickCallback: PageClick_ProjList });
          });
          PageClick_ProjList = function(pageclickednuber) {
              var pageIndex = pageclickednuber;
              var category = $("#hdnCategory").val();
              window.location = "/Projects/Category/" + category + "/Page/" + pageIndex.toString();

          }
    </script>

</asp:Content>


